package org.ch00.test07.demo03;

/**
 * @author ZQX
 * @date 2025-03-05
 */
public class MainTest01 {
    public static void main(String[] args) {
        User zs = new User();

        MuDoor door1 = new MuDoor();
        TieDoor door2 = new TieDoor();
        FangDaoDoor door3 = new FangDaoDoor();

        Car bmw = new Car();

        zs.comeInToRoom(door1);
        zs.comeInToRoom(door2);
        zs.comeInToRoom(door3);

        // 错误：bmw不是门 - 没关系（继承）
        // zs.comeInToRoom(bmw);
    }
}
